#include "texturebar.hpp"

TextureBar::~TextureBar(){}

TextureBar::TextureBar(Window* w,SDL_Rect& r,SDL_Texture* fg,SDL_Texture* bg,double init)
:ProgressBar(w,r,init),fg(fg),bg(bg){
}

void TextureBar::_draw(){
    auto r=_belong->renderer;
    auto rect=_area;
    r->DrawTexture(0,&rect,bg);
    rect.w*=value;
    r->DrawTexture(0,&rect,fg);
}